package com.pxxy.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.io.Serializable;
import java.util.List;
import com.pxxy.entity.Member;

@Mapper
public interface MemberMapper {

    int insert(@Param("member") Member member);

    int insertSelective(@Param("member") Member member);

    int insertList(@Param("members") List<Member> members);

    int update(@Param("member") Member member);

    List<Member> findAll();

    Member findById(Serializable id);

    /****
     * 查询会员的同时，级联把从属于此会员的会卡也查询出来
     * @param id
     * @return
     */
    Member findByIdCascadeCard(Serializable id);

    void bindCards(@Param("memberId")Serializable memberId, @Param("cardIdArr")Serializable[] cardIdArr);

}
